package com.mario.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.Proxy;

@Entity
@Proxy(lazy = false)
@Table(name="product")
public class Product extends MySerializable {

	private static final long serialVersionUID = -4361975184459710389L;
	
    //*********************************************************
    // Attributes
    //*********************************************************
    
    @Column(name="description")
	private String description;
    
    @Column(name="price")
    private Double price;
    
    //*********************************************************
    // Constructors
    //*********************************************************
    
    public Product() {
    	super();
    }
    
    public Product(String description, Double price){
    	super();
    	this.description = description;
    	this.price = price;
    }

    //*********************************************************
    // Getters and Setters
    //*********************************************************
    
    public String getDescription() {
        return description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    public Double getPrice() {
        return price;
    }
    
    public void setPrice(Double price) {
        this.price = price;
    }
    
    public String toString() {
        StringBuffer buffer = new StringBuffer();
        buffer.append("Description: " + description + ";");
        buffer.append("Price: " + price);
        return buffer.toString();
    }
}
